from ultralytics import YOLO

if __name__ == "__main__":
    model_path = r"E:\Access\workspace\geek\mine-yolo\runs\train\yolo11n.pt"
    target_file = r"E:\Access\bilibili\poetry\BV1f61iYnEwg-火遍大街小巷-萧亚轩爱的主打歌现在依然能打.mp4"

    # Load a model
    model = YOLO(model=model_path)
    results = model.predict(
        source=target_file,
        save=True,
        show=False,
        conf=0.5,
    )

    for result in results:
        boxes = result.boxes  # 获取边界框信息
        masks = result.masks  # 分割掩码结果
        keypoints = result.keypoints  # 关键点检测结果
        probs = result.probs  # 分类概率结果
        obb = result.obb  # 方向边界框结果（OBB）
        result.show()  # 显示结果
